/*
 * @Author: your name
 * @Date: 2022-04-01 15:48:45
 * @LastEditTime: 2022-04-01 15:52:04
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \lalalal\src\views\finance\addIncomeModal\secondStep\add\deleteOption\deleteOption.jsx
 */
/*
 * @Author: your name
 * @Date: 2022-04-01 15:05:39
 * @LastEditTime: 2022-04-01 15:47:43
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \lalalal\src\views\finance\addIncomeModal\secondStep\secondStepModal.jsx
 */
import React, { useState } from 'react';
import { Modal, Button, Form, Input} from 'antd';

const Deleteoption = () => {
    //模态框
    const [isModalVisible, setIsModalVisible] = useState(false);
    const showModal = () => {
        setIsModalVisible(true);
    };
    const handleOk = () => {
        setIsModalVisible(false);
    };
    const handleCancel = () => {
        setIsModalVisible(false);
    };

    //表单
    const onFinish = (values) => {
        console.log('Success:', values);
    };

    const onFinishFailed = (errorInfo) => {
        console.log('Failed:', errorInfo);
    };

    return (
        <>
            <Button type="primary" onClick={showModal}>
                删除自定义选项
            </Button>
            <Modal title="自定义选项值" visible={isModalVisible} onOk={handleOk} onCancel={handleCancel}>
                <Form
                    name="basic"
                    labelCol={{
                        span: 8,
                    }}
                    wrapperCol={{
                        span: 16,
                    }}
                    initialValues={{
                        remember: true,
                    }}
                    onFinish={onFinish}
                    onFinishFailed={onFinishFailed}
                    autoComplete="off"
                >
                    <Form.Item label="参数" name="parameter">
                        <Input />
                    </Form.Item>
                    <Button>添加</Button>
                    <Button>保存</Button>
                    <Button>取消</Button>
                </Form>
            </Modal>
        </>
    );
}

export default Deleteoption;
